{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "1376bbb9",
   "metadata": {},
   "outputs": [],
   "source": [
    "from total_plot import plot_it\n",
    "import numpy as np\n",
    "\n",
    "x_labels = [20, 60, 100, 140, 180]\n",
    "idx_ratio = [10000/9, 10000/29, 10000/49, 10000/69, 10000/89]\n",
    "idx_ratio_1 = [1/9, 1/29, 1/49, 1/69, 1/89]\n",
    "optimal_ratio = [0.877192982,\n",
    "                 0.879310345,\n",
    "                 0.877966102,\n",
    "                 0.937634409,\n",
    "                 0.921052632,]\n",
    "optimal_ratio_1 = [\n",
    "    0.779141104,\n",
    "    0.73549884,\n",
    "    0.754204398,\n",
    "    0.849833148,\n",
    "    0.808324206]\n",
    "\n",
    "9\n",
    "29\n",
    "49\n",
    "69\n",
    "89\n",
    "\n",
    "swap_vals = np.array([\n",
    "    [113/2, 0],\n",
    "    [372/2, 0],\n",
    "    [674/2, 0],\n",
    "    [1130/2, 0],\n",
    "    [1835/2, 0],\n",
    "])\n",
    "greedy_vals = np.array([\n",
    "    [54-9, 113],\n",
    "    [173-29, 372],\n",
    "    [298-49, 674],\n",
    "    [428-69, 1080],\n",
    "    [590-89, 1835],\n",
    "])\n",
    "optimal_vals = np.array([\n",
    "    [54-9, 103-9],\n",
    "    [173-29, 372-29],\n",
    "    [298-49, 674-49],\n",
    "    [428-69, 1080-69],\n",
    "    [590-89, 1835-89],\n",
    "])\n",
    "\n",
    "colors = ['#436691', '#f7d27d', '#da695c']  # 分别对应 swap, greedy, optimal 的颜色\n",
    "border_colors = ['#436691', '#f7d27d', '#da695c']  # 分别对应 swap, greedy, optimal 的颜色\n",
    "\n",
    "plot_it(swap_vals, greedy_vals, optimal_vals, idx_ratio_1, optimal_ratio, optimal_ratio_1, x_labels, colors, border_colors, 'fig/qubit_num_bv.pdf')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "xs",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
